﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OrderManage.aspx.cs" Inherits="HQWeb.View.Order.OrderManage" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>我的订单</title>
    <link href="../../Styles/GridViewStyle.css" rel="Stylesheet" type="text/css" />
    <script language="javascript" type="text/javascript" src="../../My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" language="javascript">
        function Adddata(obj) {
            window.open("AddWeb.aspx?id=" + obj, "", "top=150px,left=200px,height=380px,width=600px");
        }
        function Comunication(demo) {
            window.open("Comunicationdata.aspx?id=" + demo, "", "top=150px,left=200px,height=380px,width=600px");
        }
        function Jiaokuan(human) {
            window.open("Payment.aspx?id=" + human, "", "top=150px,left=200px,height=380px,width=600px");
        }
        function payList(orderID) {
            window.open("PaymentList.aspx?id=" + orderID, "", "top=150px,left=200px,height=380px,width=600px");
        }
        function ProjectList(orderID) {
            window.open("ProjectList.aspx?id=" + orderID, "", "top=150px,left=200px,height=380px,width=600px");
        }
        function orderView(orderID) {
            location = "OrderView.aspx?orderID=" + orderID;
        }
        function orderGoods(orderID) {
            window.open("GoodsHandover.aspx?id=" + orderID, "", "top=150px,left=200px,height=380px,width=600px");
        }
        function orderDelete(orderID) {
            window.open("DeleteOrder.aspx?id=" + orderID, "", "top=150px,left=200px,height=380px,width=600px");
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
      <asp:ScriptManager ID="ScriptManager" runat="server" />
    <ajaxToolkit:AutoCompleteExtender ID="ajaxtitel" runat="server" TargetControlID="textName1" ServicePath="../../Wbserver/GetSmartTips.asmx" 
    ServiceMethod="GetGroomName" MinimumPrefixLength="1" ></ajaxToolkit:AutoCompleteExtender>
    <ajaxToolkit:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="texName2" ServicePath="../../Wbserver/GetSmartTips.asmx" 
    ServiceMethod="GetBrideName" MinimumPrefixLength="1" ></ajaxToolkit:AutoCompleteExtender>  
    <div>
        庆典类型 &nbsp;&nbsp;<asp:DropDownList runat="server" ID="dropType">
        </asp:DropDownList>
        男方姓名:<asp:TextBox runat="server" ID="textName1"></asp:TextBox>&nbsp;&nbsp; 女方姓名：<asp:TextBox
            runat="server" ID="texName2"></asp:TextBox>&nbsp;&nbsp;<br />
        服务日期:<asp:TextBox runat="server" ID="textBegion" onfocus="WdatePicker()">   </asp:TextBox><img
            onclick="WdatePicker({el:'textBegion'})" src="../../My97DatePicker/skin/datePicker.gif"
            align="middle" width="16" height="28">&nbsp;&nbsp;至&nbsp;&nbsp;
        <asp:TextBox runat="server" ID="textEnd" onfocus="WdatePicker()"></asp:TextBox><img
            onclick="WdatePicker({el:'textEnd'})" src="../../My97DatePicker/skin/datePicker.gif"
            align="middle" width="16" height="28">&nbsp;&nbsp;<asp:Button ID="btnSearch" runat="server"
                Text="查询" OnClick="btnSearch_Click" />
    </div>
    <hr />
    <div>
        <asp:GridView ID="GridView1" CssClass="GridViewStyle" runat="server" AutoGenerateColumns="False"
            PageSize="25" Width="100%" AllowPaging="True" CellPadding="4" EmptyDataText="没有数据记录！！"
            OnPageIndexChanging="GridView1_PageIndexChanging" GridLines="None" DataKeyNames="ORDER_ID">
            <Columns>
                <asp:TemplateField HeaderText="序号" ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <%#Container.DisplayIndex +1%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="GROOM_NAME" HeaderText="男方姓名" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
                    <ItemStyle Width="15%"></ItemStyle>
                </asp:BoundField>
                <asp:BoundField DataField="BRIDE_NAME" HeaderText="女方姓名" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
                    <ItemStyle Width="15%"></ItemStyle>
                </asp:BoundField>
                <%--      <asp:BoundField DataField="OrderDate" HeaderText="服务日期" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center">
                    <ItemStyle Width="15%"></ItemStyle>
                </asp:BoundField>--%>
                <asp:TemplateField HeaderText="服务日期">
                    <ItemTemplate>
                        <%#Eval("OrderDate", "{0:yyyy-MM-dd}").ToString() + "  "+Eval("dataother")%>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" /> 
                </asp:TemplateField>
                <asp:BoundField DataField="Surplus" HeaderText="未交金额" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
                    <ItemStyle Width="10%"></ItemStyle>
                </asp:BoundField>
                <%--                <asp:BoundField DataField="realtoal" HeaderText="物品交接情况" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
                    <ItemStyle Width="10%"></ItemStyle>
                </asp:BoundField>--%>
                <asp:TemplateField HeaderText="物品交接情况">
                    <ItemStyle Width="10%"></ItemStyle>
                    <ItemTemplate>
                        <%#Getcheckitem(Eval("checkitem").ToString())%>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" /> 
                </asp:TemplateField>
                <asp:TemplateField HeaderText="功能">
                    <ItemTemplate>
                        <a href="javascript:void(0)" style="color: Blue" onclick="ProjectList('<%#Eval("ORDER_ID")%>')">
                            修改记录</a> <a href="javascript:void(0)" style="color: Blue" onclick="payList('<%#Eval("ORDER_ID")%>')">
                                交款记录</a> <a href="javascript:void(0)" style="color: Blue" onclick="Comunication('<%#Eval("ORDER_ID")%>')">
                                    交流记录</a>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="操作" ItemStyle-HorizontalAlign="Center">
                    <ItemTemplate>
                        <a href="javascript:void(0)" style="color: Blue" onclick="Jiaokuan('<%#Eval("ORDER_ID")%>')">
                            交款 </a><a href="javascript:void(0)" style="color: Blue" onclick="Adddata('<%#Eval("ORDER_ID")%>')">
                                添加记录</a><a href="javascript:void(0)" style="color: Blue" onclick="orderGoods('<%#Eval("ORDER_ID")%>')">
                                    物品交接 </a>
                                 <a href="javascript:void(0)" style="color: Blue" onclick="orderView('<%#Eval("ORDER_ID")%>')">
                                    详细信息 </a><a href="javascript:void(0)" style="color: Blue" onclick="orderDelete('<%#Eval("ORDER_ID")%>')">
                                    删 除 </a>
                        <%--  <asp:LinkButton ID="btnEdit" runat="server" Text="交款" CommandName="UpdateData" CommandArgument='<%#Eval("id")%>'></asp:LinkButton>--%>
                        <%--<asp:LinkButton ID="btnDelete" runat="server" Text="删除" CommandName="DelData" CommandArgument='<%#Eval("ORDER_ID")%>'></asp:LinkButton>--%>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <PagerTemplate>
                <table width="100%">
                    <tr>
                        <td style="text-align: center">
                            第<asp:Label ID="lblPageIndex" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1  %>' />页
                            共<asp:Label ID="lblPageCount" runat="server" Text='<%# ((GridView)Container.Parent.Parent).PageCount  %>' />页
                            <asp:LinkButton ID="btnFirst" runat="server" CausesValidation="False" CommandArgument="First"
                                CommandName="Page" Text="首页" />
                            <asp:LinkButton ID="btnPrev" runat="server" CausesValidation="False" CommandArgument="Prev"
                                CommandName="Page" Text="上一页" />
                            <asp:LinkButton ID="btnNext" runat="server" CausesValidation="False" CommandArgument="Next"
                                CommandName="Page" Text="下一页" />
                            <asp:LinkButton ID="btnLast" runat="server" CausesValidation="False" CommandArgument="Last"
                                CommandName="Page" Text="尾页" />
                            <asp:TextBox ID="txtNewPageIndex" runat="server" Width="28px" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1  %>' />
                            <asp:LinkButton ID="btnGo" runat="server" CausesValidation="False" CommandArgument="-1"
                                CommandName="Page" Text="GO" /><!-- here set the CommandArgument of the Go Button to '-1' as the flag -->
                        </td>
                    </tr>
                </table>
            </PagerTemplate>
            <FooterStyle CssClass="GridViewFooterStyle" />
            <RowStyle CssClass="GridViewRowStyle" />
            <SelectedRowStyle CssClass="GridViewSelectedRowStyle" />
            <PagerStyle CssClass="GridViewPagerStyle" />
            <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
            <HeaderStyle CssClass="GridViewHeaderStyle" />
        </asp:GridView>
    </div>
    </form>
</body>
</html>
